# -*- coding:utf-8 -*-
from django.forms import *
from agt2.models import Squad, Task, Hint, Key, Unit

def model_field(model, fieldname, **kwargs):
    return model._meta.get_field(fieldname).formfield(**kwargs)

class squad_CU_form(Form):
    name = model_field(Squad, 'name')
    label_suffix = ''

class TaskForm(ModelForm):
    class Meta:
        model = Task

class HintForm(ModelForm):
    class Meta:
        model = Hint


class ProfileForm(ModelForm):
    class Meta:
        model = Unit
        exclude = ('user_permissions', 'groups', 'date_joined', 'last_login', 'is_staff', 'is_active', 'is_superuser', 'password')
